<div class="issue-edit container-fluid">

  <div class="row">
    <div class="list-toolbar col-xl-12">
      <div class="title">
        <span>编辑问题</span>
      </div>

      <div class="filter">

      </div>

      <div class="buttons">
        <button (click)="back()" type="button" class="btn btn-secondary btn-with-icon btn-sm">
          <i class="fa fa-plus-circle"></i>返回
        </button>
      </div>
    </div>
  </div>

  <div *ngIf="form" class="row">
    <form [formGroup]="form" class="my-validate-form">
      <div class="form-group row elements">
        <div *ngFor="let elem of page.elements; let i = index;" [class.full-line]="elem.fullLine" class="element">
          <issue-field-edit [model]="issue" [elem]="elem"
                            [form]="form" [validateMsg]="validateMsg"></issue-field-edit>
        </div>
      </div>

      <div class="form-group row">
        <label class="col-sm-2 col-form-label"></label>
        <div class="col-sm-10">
          <button (click)="save()" type="button" class="btn btn-primary" [disabled]="!form.valid">保存</button>
          &nbsp;
          <button (click)="back()" type="button" class="btn btn-default">取消</button>
          &nbsp;&nbsp;
          <label class="col-form-label form-check-label">
            <input [(ngModel)]="next" formControlName="next" name="next"
                   class="form-check-input form-control-lg" type="checkbox" value="true">
            创建另一个
          </label>
        </div>
      </div>

      <div class="form-group row">
        <label class="col-sm-2 col-form-label"></label>
        <div class="col-sm-10">
          <div class="validate-errors">
            <div class="validate-error" *ngFor="let msg of formErrors">
              <div>{{ msg }}</div>
            </div>
          </div>
        </div>
      </div>
    </form>
  </div>

</div>
